﻿<!doctype html>
<html lang="en">
<head>
    <title>Overview</title>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="description" content="%description%" />
    <meta name="keywords" content="" />
    <meta name="author" content="ComponentOne" />
    <link href="../base-reset.css" rel="stylesheet" type="text/css" />
    <link href="../../themes/Aristo/jquery-ui-1.8.4.custom.css" rel="stylesheet" type="text/css" />
    <link href="../demos-single.css" rel="stylesheet" type="text/css" />
    <script src="../../external/jquery-1.4.3.min.js" type="text/javascript"></script>
    <script src="../../external/jquery-ui-1.8.6.custom.min.js" type="text/javascript"></script>
    <script src="../../external/raphael.js" type="text/javascript"></script>
    <script src="../../external/raphael-popup.js" type="text/javascript"></script>
    <script src="../../external/jquery.glob.min.js" type="text/javascript"></script>
    <script src="../../wijmo/jquery.ui.wijchartcore.js" type="text/javascript"></script>
    <script src="../../wijmo/jquery.ui.wijpiechart.js" type="text/javascript"></script>
    <style type="text/css">
        #wijpiechart
        {
            width: 600px;
            height: 400px;
        }
    </style>
    <script id="scriptInit" type="text/javascript">
        $(document).ready(function () {
            var duration = 500;
            var radiusOffset = 4;
            var offset = {};

            $("#wijpiechart").wijpiechart({
                radius: 140,
                legend: { visible: true },
                hint: {
                    formatter: function () {
                        return this.data.label + " : " + $.format(this.value / this.total, "p2");
                        }
                },
                header: {
                    text: "Steam - Mac Hardware"
                },
                seriesList: [{
                    label: "MacBook Pro",
                    legendEntry: true,
                    data: 46.78,
                    offset: 15,
                }, {
                    label: "iMac",
                    legendEntry: true,
                    data: 23.18,
                    offset: 0
                }, {
                    label: "MacBook",
                    legendEntry: true,
                    data: 20.25,
                    offset: 0
                }, {
                    label: "Mac Pro",
                    legendEntry: true,
                    data: 5.41,
                    offset: 0
                }, {
                    label: "Mac mini",
                    legendEntry: true,
                    data: 3.44,
                    offset: 0
                }],
                seriesStyles: [{
                    fill: "180-rgb(195,255,0)-rgb(175,229,0)", stroke: "rgb(175,229,0)", "stroke-width": "1.5"               
                }, {
                    fill: "90-rgb(142,222,67)-rgb(127,199,60)", stroke: "rgb(127,199,60)", "stroke-width": "1.5"
                }, {
                    fill: "90-rgb(106,171,167)-rgb(95,153,150)", stroke: "rgb(95,153,150)", "stroke-width": "1.5"
                }, {
                    fill: "90-rgb(70,106,133)-rgb(62,95,119)", stroke: "rgb(62,95,119)", "stroke-width": "1.5"
                }, {
                    fill: "90-rgb(166,166,166)-rgb(149,149,149)", stroke: "rgb(149,149,149)", "stroke-width": "1.5"
                }]
            });
            $("#wijpiechart").bind("wijpiechartmouseover", function (e, objData) {
                if (objData != null) {

                    var series = objData;
                    var sector = $("#wijpiechart").wijpiechart("getSector", series.index);
                    var shadow = sector.shadow;

                    offset = sector.getOffset(radiusOffset);

                    sector.animate({
                        translation: offset.x + " " + offset.y
                    }, duration, "elastic");

                    if (shadow) {
                        shadow.animate({
                            translation: offset.x + " " + offset.y
                        }, duration, "elastic");
                    }
                }
            });

            $("#wijpiechart").bind("wijpiechartmouseout", function (e, objData) {
                if (objData != null) {
                    var series = objData;
                    var sector = $("#wijpiechart").wijpiechart("getSector", series.index);
                    var shadow = sector.shadow;

                    sector.animate({
                        translation: -offset.x + " " + offset.y * -1
                    }, duration, "elastic");
                    
                    if (shadow) {
                        shadow.animate({
                            translation: -offset.x + " " + offset.y * -1
                        }, duration, "elastic");
                    }

                    offset = {x:0, y:0};
                }
            });
        });
    </script>
</head>
<body class="demo-single">
    <div class="container">
        <div class="header">
            <h2>
                Overview</h2>
        </div>
        <div class="main demo">
            <!-- Begin demo markup -->
            <div id="wijpiechart" class="ui-widget ui-widget-content ui-corner-all">
            </div>
            <!-- End demo markup -->
            <div class="demo-options">
                <!-- Begin options markup -->
                <!-- End options markup -->
            </div>
        </div>
        <div class="footer demo-description">
        </div>
    </div>
</body>
</html>
